CFLAGS = -g -Wall -lm
LIBS = 
CC=gcc
CPP=g++

.PHONY:all

CSRCS = $(wildcard *.c)
CBIN = $(patsubst %.c, %, $(CSRCS)) 

CPPSRCS = $(wildcard *.cpp)
CPPBIN = $(patsubst %.cpp, %, $(CPPSRCS))

all: $(CBIN) $(CPPBIN)

.c:
	-$(CC) $^ $(CFLAGS) $(LIBS) -o $@ 

.cpp:
	-$(CPP) $^ $(CFLAGS) $(LIBS) -o $@ 

clean:
	rm -f $(CBIN) $(CPPBIN)

